package com.cinc.ebc.sd.mapper;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cinc.ebc.sd.entity.SdSalesOrderDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cinc.ebc.sd.model.SdSalesBackDetailModel;
import com.cinc.ebc.sd.model.SdSalesOrderDetailModel;
import com.cinc.ebc.sd.model.SdSalesOrderDetailOutModel;
import com.cinc.ebc.sd.vo.SdSalesOrderDetailPage;
import org.apache.ibatis.annotations.Param;

/**
 * @Description: 销售订单明细
 * @Author: jeecg-boot
 * @Date:   2022-09-25
 * @Version: V1.0
 */
public interface SdSalesOrderDetailMapper extends BaseMapper<SdSalesOrderDetail> {

	public boolean deleteByMainId(@Param("mainId") String mainId);

	public List<SdSalesOrderDetail> selectByMainId(@Param("mainId") String mainId);

	int autoUpdateQtyInfo(@Param("id") String id);

	int autoUpdateStatus(@Param("id") String id);

	List<SdSalesOrderDetailModel> selectDetailList(Page<SdSalesOrderDetailModel> page,
												   @Param("detailPage")SdSalesOrderDetailPage detailPage,
												   @Param("permissionSql") String permissionSql);

    List<SdSalesOrderDetailOutModel> selectOutList(Page<SdSalesOrderDetailOutModel> page,
												   @Param("detailPage")SdSalesOrderDetailPage detailPage,
												   @Param("permissionSql") String permissionSql);

	List<SdSalesBackDetailModel> selectBackList(Page<SdSalesBackDetailModel> page, @Param("detailPage")SdSalesOrderDetailPage detailPage);

}
